package com.yanqu.road.entity.activity.douluodalu.enums;

public enum  eDouLuoDaLuBuffType {


    SCORE_BUFF(120640, "积分-仙草", 1, 1),

    GOODS_BUFF(120641, "道具-仙草", 1, 2),

    DAMAGE_BUFF(120642, "伤害-仙草", 1, 3),

    ENERGY_BUFF(120643, "体力-仙草", 2, 4),
    ;

    /**
     * 道具id
     */
    private int id;

    /**
     * buff名称
     */
    private String name;

    /**
     * 1：百分比加成；2：固定加成
     */
    private int type;

    /**
     * buff效果位置
     */
    private int index;

    eDouLuoDaLuBuffType(int id, String name, int type, int index) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.index = index;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public static eDouLuoDaLuBuffType getBuffType(int buffId){
        for (eDouLuoDaLuBuffType buffType : eDouLuoDaLuBuffType.values()) {
            if(buffType.getId() == buffId){
                return buffType;
            }
        }
        return null;
    }
}
